#include<iostream>
#include<string>
using namespace std;
int n, m;
int main()
{
	int t;
	cin >> t;
	while (t--) {
		int a, b, c;
		cin >> a >> b >> c;
		if (a == b && b == c) {
			cout << "YES" << endl;
			continue;
		}
		int mi = min(min(a, b), c);
		if (a % mi != 0 || b % mi != 0 || c % mi != 0) {
			cout << "NO" << endl;
			continue;
		}
		int cnt = 0;
		if (a != mi) {
			cnt += (a / mi);
			cnt--;
		}
		if (b != mi) {
			cnt += (b / mi);
			cnt--;
		}
		if (c != mi) {
			cnt += (c / mi);
			cnt--;
		}
		if (cnt > 3)cout << "NO" << endl;
		else cout << "YES" << endl;
	}
	return 0;
}
